package com.itheima.patterns.behaviorpattern.observer;

public class Client {
    public static void main(String[] args) {
        //1.创建公众号对象
        SubscriptionSubject subject = new SubscriptionSubject();
        
        //2.订阅公众号
        subject.attach(new WeiXinObserver("Tom"));
        subject.attach(new WeiXinObserver("Mike"));
        subject.attach(new WeiXinObserver("Jerry"));
        
        //3.公众号更新
        subject.notify("Java 专栏更新了！");
    }
}